
// use protos::route_common::GeoPoint;

use crate::protos::route_common::GeoPoint;
use protobuf::Message;

pub fn protobuf_demo() {
  test1();
}

fn test1() {
  let mut input = GeoPoint::new();
  input.longitude = 1.0;
  input.latitude = 2.0;
  input.height = 3;
  input.floor = 3;
  input.modelID = 4;
  let decoded = input.write_to_bytes().unwrap();
  let output = GeoPoint::parse_from_bytes(&decoded).unwrap();
  assert_eq!(output.height, input.height);
}